perf_hooks: reducing overhead of performance observer entry list#50008
Merged
nodejs-github-bot merged 3 commits intonodejs:mainfrom Oct 4, 2023
Merged
perf_hooks: reducing overhead of performance observer entry list#50008nodejs-github-bot merged 3 commits intonodejs:mainfrom
nodejs-github-bot merged 3 commits intonodejs:mainfrom
Conversation
mscdex
reviewed
Oct 2, 2023
mscdex
reviewed
Oct 2, 2023
| throw new ERR_ILLEGAL_CONSTRUCTOR(); | ||
| } | ||
|
|
||
| this[kBuffer] = ArrayPrototypeSort(entries, performanceObserverSorter); |
Contributor
There was a problem hiding this comment.
I don't know if it's a common case or not, but it may/may not be worth guarding the sort with a conditional that checks if entries.length > 1 before sorting.
Member
Author
There was a problem hiding this comment.
I added, I got 8% faster for 1 item but degraded the else path by ~8%, so I didn't think that was worth it since probably this queue will be called with more items than 1.
Qard
approved these changes
Oct 2, 2023
anonrig
approved these changes
Oct 2, 2023
Collaborator
18 tasks
Collaborator
14 tasks
Collaborator
|
Landed in 328bdac |
13 tasks
alexfernandez
pushed a commit
to alexfernandez/node
that referenced
this pull request
Nov 1, 2023
PR-URL: nodejs#50008 Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
targos
pushed a commit
that referenced
this pull request
Nov 11, 2023
PR-URL: #50008 Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
debadree25
pushed a commit
to debadree25/node
that referenced
this pull request
Apr 15, 2024
PR-URL: nodejs#50008 Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Continuing the work started on nodejs/performance#109.
cc @nodejs/performance